<script setup>
import dayjs from "dayjs"
import { routerTo } from "../../utils/common";
</script>


<template>
  <view class="page-wrap">
    <!--头部栏-->
	<tar-bar title="资讯"></tar-bar>
	<!--主题部分-->
	<view class="main-wrap">
		<view class="item" v-for="item in 4" :key="item" @tap="routerTo('/pages/news/newsDetails')">
			<view class="left-wrap">
				<view class="name">标题的时间都是借口接口sdjksdskdjskdjskdjks大十分恐惧司法解释开发街上看到介绍的几款手机打开</view>
				<view class="detail">
					<view class="user">官方</view>
					<view class="time">{{dayjs(1756278408462).format("YYYY-MM-DD")}}</view>
				</view>
			</view>
			<view class="right-wrap">
				<view class="img" v-if="true">
					<image class="image" src="/static/tmp_goods.jpg" mode="aspectFill"></image>
				</view>
			</view>
		</view>
	</view>
	<uni-load-more status="noMore"></uni-load-more>
  </view>
</template>


<style lang="scss" scoped>
.page-wrap{
	.main-wrap{
		.item{
			padding: 40rpx 20rpx;
			display: flex;
			justify-content: space-between;
			border-bottom:1rpx dashed #f0f0f0;
			gap: 24rpx;
			.left-wrap{
				flex: 1;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				gap: 30rpx;
				.name{
					font-size: 30rpx;
					color: #333;
					@include text-ellipsis(2);
				}
				.detail{
					display: flex;
					gap: 20rpx;
					font-size: 26rpx;
					color:#aaa;
				}
			}
			.right-wrap{
				flex-shrink: 0;
				overflow: hidden;
				.img{
					.image{
						width: 225rpx;
						height: 150rpx;
						border-radius: 10rpx;
					}
				}
			}
		}
		.item:last-child{
			border: none;
		}
	}
}


</style>
